import request from '@/utils/request'
import type { SearchStuModel, ResultModel, StuModel } from '@/api/model/model'
// 查询学员列表
export const queryStuList = (name: string, degree: string, clazzId: string, page: number, pageSize: number) => request.get<any, ResultModel>
    (`/students?name=${name}&degree=${degree}&clazzId=${clazzId}&page=${page}&pageSize=${pageSize}`);
//数据回显
export const getStuById = (id: string) => request.get(`/students/${id}`);

//增加学生
export const addStu = (stu: StuModel) => request.post<any, ResultModel>("/students", stu);

//更新学生
export const updateStu = (stu: StuModel) => request.put<any, ResultModel>("/students", stu);

//删除学生
export const deleteStuByIds = (ids: string) => request.delete<any, ResultModel>(`/students/${ids}`);

//查询班主任信息
export const queryAllEmpApi = () => request.get(`/emps/list`);

//违纪处理
export const violationController = (id: string, score: number) => request.put(`/students/violation/${id}/${score}`);
